<template>
	<view v-html="htmls" v-show="loading" class="padding-sm">
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loading:false,
				htmls:null
			}
		},
		onLoad(ops) {
			if(ops.id!=null && ops.id!=""){
				uni.showLoading({
					
				})
				this.getData(ops.id)
			}else{
				this.app.showMsg("数据错误","../index/index")
			}
		},
		methods: {
			getData(id){
				var that=this
				uni.request({
					url:that.app.apiHost+"/getArticel",
					method:"POST",
					data:{id:id},
					header:{'Authorization':''},
					success: (e) => {
						uni.setNavigationBarTitle({
							title:e.data.data.title
						})
						that.htmls=e.data.data.content
						that.loading=true
						uni.hideLoading()
					},
				})
			}
		}
	}
</script>

<style>

</style>
